//accepted
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <ctime>
 
using namespace std;
typedef long long ll;

int n, t, i, j, a, b;

void process(){
	scanf("%d", &n);
	a=b=0;
	for(i=0;i<n;++i){
		scanf("%d", &j);
		if(j==1)++b;
		else ++a;
	}
	
	if(a)printf("poopi\n");
	else if(b&1)printf("poopi\n");
	else printf("piloop\n");
}

int main(){
	//freopen("in.txt","r",stdin);//freopen("out.txt","w",stdout);
	scanf("%d", &t);
	
	while(t--)
	process();
	
	return 0;
}
